import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridLayout;
import javax.swing.JLabel;
import java.awt.SystemColor;
import javax.swing.JTextArea;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.JScrollBar;
import javax.swing.JTextPane;
import java.awt.ScrollPane;
import java.awt.List;
import javax.swing.SwingConstants;
import java.awt.Color;


public class TableGUI extends JFrame {

	private JPanel contentPane;
	public Player[] PlayerTab;
	public JLabel PotLabel;
	/**
	 * Create the frame.
	 */
	TableGUI(Player[] PlayerTab) {
		
		this.PlayerTab = PlayerTab;
		setResizable(false);
		setTitle("Poker");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(300, 0, 750, 750);
		contentPane = new JPanel();
		contentPane.setBackground(SystemColor.activeCaption);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		JPanel GamePanel = new JPanel();
		contentPane.add(GamePanel, BorderLayout.CENTER);
		GamePanel.setLayout(new GridLayout(2, 2, 0, 0));
		
		PotLabel = new JLabel("0");
		PotLabel.setFont(new Font("Tahoma", Font.PLAIN, 15));
		PotLabel.setToolTipText("Game Pot");
		PotLabel.setHorizontalAlignment(SwingConstants.TRAILING);
		contentPane.add(PotLabel, BorderLayout.NORTH);
		
		for(int i=0;i<4;i++) {
			if(this.PlayerTab[i] != null)
			GamePanel.add(PlayerTab[i]);
		}
	}

}
